<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/4/10
  Time: 23:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>简历列表</title>
</head>
<body>
<div class="container">

    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>简历列表 —— 显示所有简历</small>
                </h1>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-4 column">
            <a class="btn btn-primary" href="${pageContext.request.contextPath}/resumes/toAddResume">新增简历</a>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>简历编号</th>
                    <th>地址</th>
                    <th>姓名</th>
                    <th>电话</th>
                    <th>操作</th>
                </tr>
                </thead>

                <!-- 简历从数据库中查询出来，从这个list中遍历出来:c:foreach -->
                <tbody>
                <!-- 可以从request域中拿requestScope.get('list')，其实也可以直接获取list,后边的同理 -->
                <c:forEach var="resume" items="${data}">
                    <tr>
                        <td>${resume.id}</td>
                        <td>${resume.address}</td>
                        <td>${resume.name}</td>
                        <td>${resume.phone}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/resumes/update/${resume.id}">修改</a>
                            &nbsp; | &nbsp;
                            <a href="${pageContext.request.contextPath}/resumes/delete/${resume.id}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>

    <div class="row">
        <div class="col-md-4 column">
            <a class="btn btn-primary" href="${pageContext.request.contextPath}/logout">退出</a><br/>
            <a class="btn btn-primary" href="${pageContext.request.contextPath}/exception">异常测试</a>
        </div>
    </div>
</div>
</body>
</html>
